/*
** rituel.c for  in /home/massro_a//zappy-2011/rituel_elevation
** 
** Made by ancet massrouf
** Login   <massro_a@epitech.net>
** 
** Started on  Thu Jul  7 21:51:26 2011 ancet massrouf
** Last update Thu Jul  7 22:27:57 2011 ancet massrouf
*/

#include "rituel.h"
#include "case.h"

void		elevation_1_2(t_case *t_case)
{
  if((t_case->nb_trantorians == 1)
     && (t_case->resources->linemate == 1)
     && (t_case->resources->deraumere == 0)
     && (t_case->resources->sibur== 0)
     && (t_case->resources->mendiane == 0) 
     && (t_case->resources->phiras == 0)
     && (t_case->resources->thystame == 0))
    return(ELEV_SUCCESS_LEVEL_1_2);
  return(ELEVATION_FAILURE);
}
void		elevation_2_3(t_case *t_case)
{
  if(t_case->nb_trantorians == 2) 
     && (t_case->resources->linemate == 1)
     && (t_case->resources->deraumere == 1)
     && (t_case->resources->sibur== 1)
     && (t_case->resources->mendiane == 0) 
     && (t_case->resources->phiras == 0)
     && (t_case->resources->thystame == 0))
    return(ELEV_SUCCESS_LEVEL_2_3);
  return(ELEVATION_FAILURE);
}
void		elevation_3_4(t_case *t_case)
{
  if(t_case->nb_trantorians == 2) 
     && (t_case->resources->linemate == 2)
     && (t_case->resources->deraumere == 0)
     && (t_case->resources->sibur== 1)
     && (t_case->resources->mendiane == 0) 
     && (t_case->resources->phiras == 2)
     && (t_case->resources->thystame == 0))
    return(ELEV_SUCCESS_LEVEL_3_4);
  return(ELEVATION_FAILURE);
}
void		elevation_4_5(t_case *t_case)
{
  if(t_case->nb_trantorians == 4) 
     && (t_case->resources->linemate == 1)
     && (t_case->resources->deraumere == 1)
     && (t_case->resources->sibur== 2)
     && (t_case->resources->mendiane == 0) 
     && (t_case->resources->phiras == 1)
     && (t_case->resources->thystame == 0))
    return(ELEV_SUCCESS_4_5);
  return(ELEVATION_FAILURE);
}
void		elevation_5_6(t_case *t_case)
{
  if(t_case->nb_trantorians == 4) 
     && (t_case->resources->linemate == 1)
     && (t_case->resources->deraumere == 2)
     && (t_case->resources->sibur== 1)
     && (t_case->resources->mendiane == 3) 
     && (t_case->resources->phiras == 0)
     && (t_case->resources->thystame == 0))
    return(ELEV_SUCCESS_LEVEL_5_6);
  return(ELEVATION_FAILURE);
}
void		elevation_6_7(t_case *t_case)
{
  if(t_case->nb_trantorians == 6) 
     && (t_case->resources->linemate == 1)
     && (t_case->resources->deraumere == 2)
     && (t_case->resources->sibur== 3)
     && (t_case->resources->mendiane == 0) 
     && (t_case->resources->phiras == 1)
     && (t_case->resources->thystame == 0))
    return(ELEV_SUCCESS_LEVEL_6_7);
  return(ELEVATION_FAILURE);
}
void		elevation_7_8(t_case *t_case)
{
  if(t_case->nb_trantorians == 6) 
     && (t_case->resources->linemate == 2)
     && (t_case->resources->deraumere == 2)
     && (t_case->resources->sibur== 2)
     && (t_case->resources->mendiane == 2) 
     && (t_case->resources->phiras == 2)
     && (t_case->resources->thystame == 1))
    return(ELEV_SUCCESS_7_8);
  return(ELEVATION_FAILURE);
}
